package felix.things.router.modbus.mapping;

import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class TypeTagMapping extends TagMapping {
    private Class type = Long.class;

    public TypeTagMapping(String tag, int address) {
        setTag(tag);
        setAddress(address);
    }

    public TypeTagMapping(String tag, Class type, int address) {
        this.type = type;
        setTag(tag);
        setAddress(address);
    }

    public TypeTagMapping(String tag, Class type, int address, int registerCount, String byteOrder) {
        this.type = type;
        setTag(tag);
        setAddress(address);
        setRegisterCount(registerCount);
        setByteOrder(byteOrder);
    }
}